home *** CD-ROM | disk | FTP | other *** search
/ Click - International Series 1 / Click Jigsaw Puzzles: Ken Duncan.iso / mac / puzzles / Tranquility.dxr / 00223_startMovie.ls < prev    next >
Encoding:
Text File  |  2002-11-11  |  4.4 KB  |  134 lines

  1. global allTogether, fit, piecesParts, allPieces, start, totalPieces, tolerance, stageWide, stageTall, saved, puzzCrop, currentPuzzle, puzzShape, puzzFolder, allReadyPuzzles, stageStart, downloadRate, statusChk, puzzPicFileURL, progressSprite, progWide, completePreviewLoc, puzzPrefs, puzzleTile, clipartList, isShockmachine, memberID, isSWXtra, puzzleDay, puzzlePicID, puzzleBmpID, puzzleTxtID, netID, gSM_StretchContent
  2.  
  3. on startMovie
  4.   allowZooming = 1
  5.   tolerance = 5
  6.   puzzleTile = 10
  7.   case the runMode of
  8.     "projector":
  9.       if offset(".dcr", the moviePath) > 0 then
  10.         thisMem = 1
  11.         repeat while thisMem <= 172
  12.           erase(member(thisMem))
  13.           thisMem = 1 + thisMem
  14.         end repeat
  15.         alert("This location," && the moviePath && "is not authorized to use Shockwave file" && the movie & ".")
  16.         halt()
  17.       end if
  18.     "author":
  19.       isShockmachine = 1
  20.       if offset(".dcr", the moviePath) > 0 then
  21.         thisMem = 1
  22.         repeat while thisMem <= 172
  23.           erase(member(thisMem))
  24.           thisMem = 1 + thisMem
  25.         end repeat
  26.         alert("This location," && the moviePath && "is not authorized to use Shockwave file" && the movie & ".")
  27.         halt()
  28.       end if
  29.     "plugin":
  30.       isShockmachine = getProp(the environment, #shockMachine)
  31.       if not isShockmachine then
  32.         the itemDelimiter = "/"
  33.         if offset("shockwave.com", item 3 of the moviePath) > 0 then
  34.           playOK = 1
  35.         end if
  36.         if offset("venuemedia.com", item 3 of the moviePath) > 0 then
  37.           playOK = 1
  38.         end if
  39.         if not playOK then
  40.         end if
  41.       end if
  42.   end case
  43. end
  44.  
  45. on initPuzzler
  46.   go("hold")
  47.   thisSprite = 233
  48.   repeat while thisSprite <= 239
  49.     set the puppet of sprite thisSprite to 1
  50.     thisSprite = 1 + thisSprite
  51.   end repeat
  52.   member("puzzle player tile").media = member("tile1").media
  53.   set the stageColor to the stageColor
  54.   set the member of sprite 233 to "menuBar"
  55.   set the rect of sprite 233 to rect(0, 0, stageWide, 21)
  56.   set the member of sprite 235 to "jigsaw"
  57.   set the member of sprite 236 to "backgrounds"
  58.   set the member of sprite 237 to "puzzlePlayerHelp"
  59.   updateStage()
  60.   go("initPuzzle")
  61. end
  62.  
  63. on idle
  64.   if (the activeWindow).rect.width <> stageWide then
  65.     resizeStage()
  66.   end if
  67. end
  68.  
  69. on stopMovie
  70.   if the runMode = "author" then
  71.     thisSprite = 2
  72.     repeat while thisSprite <= 220
  73.       set the loc of sprite thisSprite to point(-9999, -9999)
  74.       thisSprite = 1 + thisSprite
  75.     end repeat
  76.     thisMember = 1
  77.     repeat while thisMember <= 220
  78.       erase(member(thisMember))
  79.       thisMember = 1 + thisMember
  80.     end repeat
  81.     thisSprite = 1
  82.     repeat while thisSprite <= 300
  83.       sprite(thisSprite).visible = 1
  84.       thisSprite = 1 + thisSprite
  85.     end repeat
  86.     updateStage()
  87.     nulltile = member("null tile").media
  88.     member("puzzle player tile").media = nulltile
  89.     put EMPTY into field "endgame"
  90.     put EMPTY into field "version"
  91.     set the foreColor of member "puzzPicFile" to 0
  92.     member("puzzPicFile").editable = 0
  93.     member("puzzPicFile").rect = rect(0, 0, 447, 12)
  94.     put "Download progress" into field "puzzPicFile"
  95.     member("complete" & string(puzzShape)).media = member("nullPic").media
  96.     member("puzzPic" & string(puzzShape)).media = member("nullPic").media
  97.     member("preview" & string(puzzShape)).media = member("nullPic").media
  98.   end if
  99. end
  100.  
  101. on resizeStage
  102.   deskWide = (the desktopRectList)[1].width
  103.   if deskWide = stageWide then
  104.   end if
  105.   puzzRect = (the activeWindow).rect
  106.   sprite(1).rect = puzzRect
  107.   sprite(1).loc = point(0, 0)
  108.   stageWide = puzzRect.width
  109.   stageTall = puzzRect.height
  110.   set the rect of sprite 1 to rect(0, 0, stageWide, stageTall)
  111.   if (the frame < 10) or (the frame > 40) then
  112.     set the rect of sprite 38 to rect(0, 380, stageWide, stageTall)
  113.     set the rect of sprite 39 to rect(640, 0, stageWide, stageTall)
  114.     set the rect of sprite 40 to rect(0, 0, stageWide, stageTall)
  115.   end if
  116.   set the puppet of sprite 233 to 1
  117.   set the member of sprite 233 to "menuBar"
  118.   set the rect of sprite 233 to rect(0, 0, stageWide, 21)
  119.   member("endGame").rect = rect(0, 0, stageWide - 231, 26)
  120.   sprite(238).rect = rect(220, 0, stageWide - 11, 26)
  121.   set the locH of sprite 239 to stageWide - 2
  122.   updateStage()
  123. end
  124.  
  125. on clearMenu me
  126.   set the mouseDownScript to EMPTY
  127.   aSprite = 250
  128.   repeat while aSprite <= 259
  129.     set the loc of sprite aSprite to point(-9999, -9999)
  130.     aSprite = 1 + aSprite
  131.   end repeat
  132.   updateStage()
  133. end
  134.